<!DOCTYPE html>
<html>
    <body onload="chechCookies()">
        <script>
            function chechCookies(){
                if(navigator.cookieEnabled==true){
                    alert("cookie可用")
                }else{
                    alert("cookie不可用")
                }
            }
            
        </script>
        <p>弹窗提示cookie是否可用。</p>
    </body>
</html>